﻿using QuestionnaireInvestigation.Data.Service;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;

namespace QuestionnaireInvestigation.Controllers
{
    public class SystemsAnalysisController : ApiController
    {
        SystemsAnalysisService _service = new SystemsAnalysisService();
        [Authorize]
        [System.Web.Mvc.HttpGet]
        public List<int> GetAnswerSituation()
        {
            try
            {
                return _service.GetAnswerSituation();
            }
            catch
            {
                return null;
            }
        }
        [Authorize]
        [System.Web.Mvc.HttpGet]
        public List<int> GetCreateSituation()
        {
            try
            {
                return _service.GetCreateSituation();
            }
            catch
            {
                return null;
            }
        }
        [Authorize]
        [System.Web.Mvc.HttpGet]
        public int GetAnswerNumber()
        {
            try
            {
                return _service.GetAnswerNumber();
            }
            catch
            {
                return 0;
            }
        }
        [Authorize]
        [System.Web.Mvc.HttpGet]
        public int GetQuestionnaireNumber()
        {
            try
            {
                return _service.GetQuestionnaireNumber();
            }
            catch
            {
                return 0;
            }
        }
    }
}
